import http from "@/utils/request"

export const createTopic = async (title)=>{
    console.log("createTopic");
    return await http.post('/topic/createTopic',{
        title
    })
}


export const getTopicList = async ()=>{
    console.log("getTopicList");
    return await http.get('/topic/getTopicList')
}

export const deleteTopic = async (id)=>{
    console.log("deleteTopic")
    return await http.post('/topic/deleteTopic',{
        id
    })
}


export const deleteUserTopicList = async (userId)=>{
    console.log("deleteUserTopicList")
    return await http.post('/topic/deleteUserTopicList',{
        userId
    })
}